package swagger

// Swagger 服务部分的结构体
type Swagger struct {
	Schemes     []string `toml:"schemes" yaml:"schemes" env:"SWAGGER_SCHEMES"`             // 协议
	Version     string   `toml:"version" yaml:"version" env:"SWAGGER_VERSION"`             // 版本
	Title       string   `toml:"title" yaml:"title" env:"SWAGGER_TITLE"`                   // 标题
	Description string   `toml:"description" yaml:"description" env:"SWAGGER_DESCRIPTION"` // 描述
	APIPath     string   `toml:"api_path" yaml:"api_path" env:"SWAGGER_API_PATH"`          // api文档路径
}

func NewSwagger() *Swagger {
	return &Swagger{
		Schemes:     []string{"http"},
		Version:     "1.0.0",
		Title:       "Swagger Example API",
		Description: "This is a sample server Petstore server.",
		APIPath:     "/apidocs.json",
	}
}
